<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ taglib tagdir="/WEB-INF/tags" prefix="mytags" %>

<html>
<head>

<title>User Profile Editor</title>
</head>
<body>


<%@page import="java.util.*"%>
<%@ page import="csc.traning.wpsj.servlet.lessons.*" %>
<%-- <jsp:useBean id="user" class="csc.traning.wpsj.dao.User" scope="request"></jsp:useBean>--%>
<%@page import="csc.traning.wpsj.dao.User"%>


<div style="width: 1000px; height: 50px;text-align: right;">Welcome <b>${user.userName}</b>, <a href="logout">Logout</a></div>
<div style="width: 1000px">
	<div style="float: left;width:200px;text-align: left;">
		<div>
			<fieldset style="height: 200px;background: #EFEDFC">
				<legend style="color: graytext;font-weight: bold;">Common Information</legend>
				<p style="font-size: 14">Capacity:<fmt:formatNumber type="percent" maxIntegerDigits="2" value="${capacity}" maxFractionDigits="2" /> in use</p>
				<div id="numOfOnline">Currently online: ${numOfOnline } </div>
			
			</fieldset>
		</div>
		<%@include file="viewUser.jsp" %>
	</div>
	
	<div style="float: left;width:800px;">
	<mytags:message color="red"/>
		<fieldset style="min-height:500px;">
			<legend style="color: graytext;font-weight: bold;">User Profiles Editor</legend>
			<br />
			
			<div align="center">
				<form action="profile_editor" method="post">
					<table>
						<tr>
							<td>First Name:</td>
							<td>
								<input type="text" name="firstName" value="${user.firstName }" size="20px" /><span style="color:red;">*</span>
							</td>		  		
						</tr>
						<tr>
							<td>Last Name:</td>
							<td>
								<input type="text" name="lastName" value="${user.lastName}" size="20px" /><span style="color:red;">*</span>
							</td>		  		
						</tr>
						<tr>
							<td>Username:</td>
							<td>
								<input type="text" name="userName" value="${user.userName}" size="20px" /><span style="color:red;">*</span>
							</td>		  		
						</tr>
						<tr>
							<td>Email Address:</td>
							<td>
								<input type="text" name="emailAddress" value="${user.emailAddress}" size="40px" /><span style="color:red;">*</span>
							</td>		  		
						</tr>
						<tr>
							<td>Cellphone:</td>
							<td>
								<input type="text" name="cellphone" value="${user.cellphone}" size="30px" />
							</td>
						</tr>
						<tr align="center">
							<td colspan="2"> 
								<br /><br /><input type="submit" value="Accept Change" /><input type="reset" value="Cancel" onclick="window.location.href ='file-management'"/><br/>
							</td>				
						</tr>
					  </table>
					</form>
			</div>
		</fieldset>
	</div>

</div>
</body>
</html>